package com.qigao.mall.web.job;

import com.qigao.mall.api.DataStoreService;
import com.qigao.mall.api.LoginInfoService;
import com.qigao.mall.api.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author luiz
 * @Title: com.qigao.mall.web.job
 * @ProjectName three-mall
 * @date 2019-11-2019/11/20 10:42
 * @Description: 订单相关的定时任务
 */
@Component
public class LoginJob {
    @Autowired
    @Qualifier("tbCacheInfoServiceImpl")
    private DataStoreService dataStoreService;
    /**
     * 刷新登录状态
     * 每天凌晨一点半清空
     */
    @Scheduled( cron="0 30 1 * * ? ")
    public void refreshOrderOverTime(){
        dataStoreService.delOverTime();
    }
}
